<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let abc = 0;
        console.log(b);
        if(true){
            console.log(abc);
            let abb = 3;
            var b = 23;
        }
        let abb = 5;
        console.log(abb);

        for (var i = 0; i < 3; i++) {
            console.log(i);
        }
        console.log(i);


        var abbb = 2;
        if(true){
            // abbb = 7;
            let abbb;
            console.log(abbb);
        }

        console.log('-----------------');

        var arr = [];
        for (let i = 0; i < 2; i++) {

            arr[i] = function() {
                console.log(i);
            }
        };
        // console.log(arr);
        arr[0]();
        arr[1]();
    </script>
</body>
</html>